Magnetic field sensors employ a variety of types of magnetic field sensing elements, for example, Hall effect elements and magnetoresistance elements, often coupled to a variety of electronics, all supported by a common substrate. Some magnetic field sensors (referred to herein as “two-dimensional” or “2D” magnetic field sensors) can sense magnetic fields in two different axes. Other magnetic field sensors (referred to herein as “three-dimensional” or “3D” magnetic field sensors) can sense magnetic fields in three different axes.
A magnetic field sensing element (and a magnetic field sensor) can be characterized by a variety of performance characteristics, one of which is a sensitivity, which can be expressed in terms of an output signal amplitude versus a magnetic field to which the magnetic field sensing element is exposed. The sensitivity of a magnetic field sensing element, and therefore, of a magnetic field sensor, is known to change in relation to a number of parameters. For example, the sensitivity can change in relation to a change in temperature of the magnetic field sensing element. As another example, the sensitivity can change in relation to a mechanical stress (or “strain”) imposed upon the substrate supporting the magnetic field sensing element. Such stress can be imposed upon the substrate at the time of manufacture of an integrated circuit containing the substrate. For example, the strain can be imposed by stresses caused by curing of molding compounds used to form an encapsulation of the substrate, e.g., a plastic encapsulation.
It may be desirable to keep the gain of a magnetic field sensing element (or magnetic field sensor) constant over changes in temperature, mechanical stress, and other phenomena that may affect sensitivity. It is known to adjust the absolute gain of a magnetic field sensing element by applying a reference field and comparing the output signal amplitude to the known input magnetic field. To apply a reference field, a current may be passed through a coil that is located about the sensing element. If the current going into the coil is highly accurate over temperature, stress, etc., the absolute gain of the sensing element may be kept generally invariant. Moreover, it may be necessary to trim the current drive into the coil in order to maintain highly accurate absolute gain. Examples of using coil-generated reference fields with magnetic field sensors are described in U.S. Pat. Nos. 7,923,996, 8,447,556, and 9,201,122, each of which is incorporated by reference herein in its entirety.